Discovering golden ratio in the world’s first five-agent network in ancient China

The world’s first five-agent network, also called Wuxing network in ancient China, had been fully established in the second century BC. Surprisingly, the key to cracking the operation of Wuxing network is the golden ratio, the world’s most astonishing number originating from ancient Greece. Wuxing network is composed of five agents located on the vertices of a pentagon such that adjacent agents cooperate with each other, while spaced-apart agents oppose each other. Although it was proposed more than 2000 years ago, it is still an unparalleled network operation protocol. This article reveals the role of the golden ratio in the balance and stability of Wuxing network, and demonstrates how to detect the golden ratio experimentally in Wuxing electronic circuits and in Wuxing formation flight of drones.


Ciann-Dong Yang
The world's first five-agent network, also called Wuxing network in ancient China, had been fully established in the second century BC.Surprisingly, the key to cracking the operation of Wuxing network is the golden ratio, the world's most astonishing number originating from ancient Greece.Wuxing network is composed of five agents located on the vertices of a pentagon such that adjacent agents cooperate with each other, while spaced-apart agents oppose each other.Although it was proposed more than 2000 years ago, it is still an unparalleled network operation protocol.This article reveals the role of the golden ratio in the balance and stability of Wuxing network, and demonstrates how to detect the golden ratio experimentally in Wuxing electronic circuits and in Wuxing formation flight of drones.
Wuxing Network 1-3 and the golden ratio 4,5 each originated independently from the early days of Chinese and Greek civilizations.So far they have diverse applications in their respective fields, but the relationship between them is unknown to the world.The main reason is that Wuxing network has always lacked a rigorous mathematical model to describe its operation, so that its relationship with the golden ratio has never been discovered.In this article, we use the multi-agent network theory to establish a mathematical model describing the operation of Wuxing network.From this model, we find that since the emergence of Wuxing network, the golden ratio has been hidden in it, controlling its balance and stability.Practical methods to detect the golden ratio in Wuxing network are proposed in terms of electronic circuits and formation flight of drones.More significantly, through the geometric meaning of the golden ratio, we can extend the ancient five-agent Wuxing network to obtain a general N-agent network and the accompanying general golden ratio.
Wuxing network is a natural philosophical thought in ancient China [1][2][3]6 . Itmatured in the second century BC to unify the laws of nature and human body with worldwide applications to seemingly disparate fields such as dynastic transitions 7 , geomancy 8 , astrology 9 , traditional Chinese medicine 10 , painting 11 , music 12 , military strategy 13 , and martial arts 14 .The system described by Wuxing network contains five elements, which are represented pictographically by five natural substances: wood, fire, earth, metal, and water, located on the vertices of a pentagon as shown in Fig. 1.Due to this pictographic correspondence, Wuxing network is often misunderstood as a classification of natural matter, similar to the Four Elements doctrine of early Greek philosophy 15 .In fact, the original concept of Wuxing philosophy is to express the inter-conversion between five components or units in a system through the analogy with the five natural substances.In other words, Wuxing network is concerned with the growth and decline between the five components, rather than the physical entities represented by the five components.
Wuxing network has long been widely used in different systems, whose size and attributes vary widely.In these systems, the five elements in Wuxing pictograph no longer refer to five specific substances, but are abstracted into five characteristics, five phases, or five trends of the system.These different connotations of Wuxing philosophy have evolved into a variety of different agents representing the five elements.Wuxing network has the most typical agents in history in three broad categories.The agents in the sky are the five planets of Jupiter, Mars, Saturn, Venus, and Mercury; the agents on the ground are the five seasons of spring, summer, long summer, autumn, and winter; the agents in the human body are the five organs of liver, heart, spleen, lung and kidney.It is based on the interactions among these three categories of agents of Wuxing network that traditional Chinese medicine explains the causes of human diseases and proposes the methods of medical treatment 10 .
The operation of Wuxing pictograph depends on the mutual interaction between the agents, regardless of the physical entities represented by the agents.From the classification of modern science, Wuxing pictograph actually represents a multi-agent network 16,17 , in which the number of agents is five.The agent nature of Wuxing network allows it to transcend the limitations of the physical systems and to apply to completely unrelated fields.Wuxing network proposed the world's first network operation protocol that adjacent agents cooperate with each other (mutual generating), while spaced-apart agents compete against each other (mutual overcoming), as shown in Fig. 1.Wuxing operation protocol is not created by one person at one time and one place.Its creation is the evolution result of a long history that began in the Western Zhou Dynasty (1046-771 BC).A complete description of Wuxing operation protocol appeared for the first time in the book: Luxuriant Dew of the Spring and Autumn Annals, edited by Dong Zhongshu (192-104 BC, a Han dynasty Chinese philosopher, politician, and writer).
The Wuxing philosophy advocates that Wuxing network with mixed cooperative and antagonistic interactions can reach the state of harmony, in which two opposing interactions are balanced.This subject is particularly important in the current situation of limited global resources.The operation of Wuxing network shows us how to achieve a harmonic relationship between resource cooperation and competition.In the past two thousand years, many Chinese philosophers employed Wuxing network consisting of agents with different nature to demonstrate the spirit of harmony.However, due to the lack of a mathematical model that can correctly describe the operation of Wuxing network, the balance and harmony of Wuxing network remains only a philosophical point of view.In view of the scientific demand for traditional Chinese medicine, whose essential logic is based on Wuxing philosophy, a few Chinese literatures [18][19][20] have established preliminary mathematical models for Wuxing network.Without the consideration of modern multi-agent network theory and graph theory 6 , the mathematical models established so far are unable to manifest the main features of Wuxing Network.

The first encounter with the golden ratio in Wuxing network
What makes us curious is why Wuxing network and the golden ratio derived from different Eastern and Western cultural thoughts are related?The first reason that comes to mind is, perhaps because they are all related to regular pentagons.As shown in Fig. 1, the golden ratio refers to the ratio of the diagonal length to the side length of a regular pentagon.On the other hand, the positions of the five agents of Wuxing network can also be connected to form a regular pentagon.However, this apparent reason did not fully respond to our curiosity, because what Wuxing network describes is not a static geometric pattern, but a dynamic process.We must further explore the possible role of the golden ratio from the dynamic behavior of Wuxing network.
The operation of Wuxing network obeys the rule that the neighboring agents cooperate with each other (mutual generating), while the spaced-apart agents compete with each other (mutual overcoming).Cooperative interaction reduces the difference between agents, while antagonistic interaction expands the difference between agents.So when the interactions of cooperation and antagonism occur at the same time, is the difference between the five agents smaller or larger?It is in the process of analyzing this problem that we first discovered the vague shadow of the golden ratio in Wuxing network.In order to quantify the interaction, we let a > 0 and b > 0 be the cooperative weights, and their sum a + b represents the intensity of the cooperative interaction, as shown in Fig. 1.Similarly, we let −c < 0 and −d < 0 be the antagonistic weights, and their magnitude sum c + d represents the intensity of the antagonistic interaction.
A very intuitive inference is that when the cooperative intensity a + b is equal to the antagonistic intensity c + d , Wuxing network should be in a balanced state, that is, the difference between the five agents is neither increased nor decreased.However, the computation results show that this intuitive inference is wrong.The actual situation is that when a + b = c + d , the difference between the five agents will become larger and larger over www.nature.com/scientificreports/time.In other words, in this case, the antagonistic effect is still stronger than the cooperative effect.Obviously, the cooperative intensity a + b must be greater than the antagonistic intensity c + d for Wuxing network to reach a balanced state.Therefore, we gradually increase the intensity ratio (a + b)/(c + d) from 1 and monitor the dynamic response of Wuxing network to search for a balanced state.Sure enough, when (a + b)/(c + d) increases to a critical value approximately equal to 2.618, Wuxing network reaches the expected balanced state.If this threshold is further exceeded, Wuxing network will assume a state of consensus, that is, the difference between the five agents will decrease to zero over time.This is our first encounter with the golden ratio in the operation of Wuxing network, as described in Fig. 1.Later in the theoretical verification, we learned that this critical value of 2.618 turned out to be an approximation of the squared golden ratio ϕ 2 .

The theoretical evidence of the golden ratio in Wuxing network
The critical ratio (a + b)/(c + d) = 2.618 forms the watershed of the dynamic response of Wuxing network.This particular number 2.618 arouses our interest in further investigation of Wuxing network.The agent nature of Wuxing network allows us to replace the five natural substances with five abstract agents, represented by five symbols A, B, C, D, E, as long as their interactions follow the Wuxing network's operation protocol.Different from the existing multi-agent networks, the agents in Wuxing network cannot be divided into groups such that two agents belonging to the same group are friends with cooperative interaction and two agents belonging to different groups are enemies with antagonistic interaction.Existing discussions on multi-agent networks, such as balance, stability, consensus, and control, etc., are aimed at cooperative networks 21,22 , bipartite networks [23][24][25][26] , or multi-party networks 27 , which all cannot be applied directly to Wuxing network.
Fortunately, the special structure of Wuxing network allows us to analyze its dynamic behavior in an analytical way.Let the quantitative indices of the five agents be represented respectively by x A , x B ,x C , x D , and x E .The interchanges between x i under the influence of the cooperative and antagonistic interactions can be described by a linear equation Ẋ = A 5 X , with X = [x A , x B , x C , x D , x E ] T .The system matrix A 5 , which can be expressed in terms of the cooperative weights a and b , and the antagonistic weights −c and −d , determines the dynamic behavior of Wuxing network.The stability of Wuxing network depends on whether the real part of the dominant eigenvalue of A 5 , Re( domi (A 5 )) , is positive or negative.The boundary of stability is formed by the condition: Re( domi (A 5 )) = 0 , from which the constraint imposed on the intensity ratio can be found analytically as: Here we formally encounter the golden ratio ϕ = (1 + √ 5)/2 in Wuxing network.The squared golden ratio ϕ 2 = 1 + ϕ ≈ 2.618 is just the critical value we found previously in the numerical analysis of Wuxing network.
Depending on the intensity ratio (a + b)/(c + d) , Wuxing network presents three different dynamic behav- iors, as shown in Fig. 2. When the intensity ratio is lower than ϕ 2 , Wuxing network is unstable with divergent x i (t) .When the intensity ratio is equal to ϕ 2 , Wuxing network is balanced such that x i (t) neither diverges nor converges, but presents harmonic oscillation.When the intensity ratio is greater than ϕ 2 , Wuxing network enters the state of consensus, where x i (t) converges to the same value.Equation (1) provides the theoretical evidence that the golden ratio is an inseparable part of Wuxing network.However, this evidence has never been discovered during the historic development of Wuxing network.

Detecting golden ratio in Wuxing electronic circuit
The existence of the golden ratio in Wuxing network can be detected experimentally by realizing Wuxing network in terms of electronic circuits.The resulting Wuxing circuit has five nodes arranged in such a manner that the adjacent nodes are connected by positive resistance R a to exhibit cooperative interaction with weights a = b = R −1 a > 0 , while the spaced-apart nodes are connected by negative resistances −R c and −R d to exhibit antagonistic interaction with weights −c = −R −1 c < 0 and −d = −R −1 d < 0 , as shown in Fig. 3. Negative resistance is also called negative differential resistance 28 , which refers to the characteristic that the voltage of some circuits or electronic components decreases when the current in a certain range increases.In general, when the current increases, the voltage also increases, but the negative resistance exhibits the opposite of the normal resistance.At present, there is no single electronic component that can exhibit negative resistance in all working ranges.However, some diodes, such as resonant tunneling diode 29 , have negative resistance in a specific working range.The red component symbol in Fig. 3 represents the resonant tunneling diode operating in the region with negative resistance.
Wuxing circuit shown in Fig. 3 is a modern realization of Wuxing network in Fig. 2, and the dynamic behaviors of the letter can be synthesized practically by the electronic signals of the former.The analogy between Figs. 2 and 3 provides us an experimental method to detect the golden ratio by tuning the resistance ratio then exactly gives the squared golden ratio ϕ 2 .When operating at the tuned point, Wuxing electronic circuit behaves like a harmonic oscillator, whose oscillation frequency ω can be freely specified by adjusting the relative magnitude of R c to R d .

Detecting golden ratio in Wuxing-formation flight
The autonomous agents of Wuxing network could be five drones, five self-driving cars or five intelligent robots, as long as the agent's behavior can comply with the operation protocol of Wuxing network.  Wuxing network exhibits unstable dynamic behavior.When the intensity ratio is equal to ϕ 2 , Wuxing network reaches a balanced state, where x i (t) presents a harmonic oscillation.When the intensity ratio is greater than ϕ 2 , Wuxing network enters a consensus state, where x i (t) converges to the same value.implements the hybrid interactions of Wuxing network through five automatic control units with sensing, computing and driving capabilities.Different from the current formation flight for which all the drones are friends 30,31 , Wuxing formation flight has an extraordinary property that the adjacent drones with cooperative interaction are friends and they tend to fly together, while the spaced-apart drones with antagonistic interaction are enemies and they tend to fly apart.From the viewpoint of feedback control theory 32 , the cooperative interaction in Wuxing network is equivalent to negative feedback control with gains a and b (blue loops in Fig. 4), and the antagonistic interaction is equivalent to positive feedback control with gains c and d (red loops in Fig. 4).Positive feedback increases the coordination error between the drones, while negative feedback reduces the coordination error.Therefore, the ancient Wuxing network raises a challenge to the modern control theory about how to ensure the system's stability if negative feedback and positive feedback coexist within the system.However, Wuxing network had already solved this control problem by itself with the help of its intrinsic partner: the golden ratio.
In order to achieve the formation flight, the five drones have to reach the state of consensus, where the coordination error between them converges to zero.The analogy between Figs. 2 and 4 indicates that the state of consensus is attained by requiring that the ratio of the negative feedback gain a + b to the positive feedback gain c + d must be greater than the squared golden ratio ϕ 2 .The right part of Fig. 4 shows that drone A receives a circular path command r com and leads the other drones to flight coordinately along the path command, once the condition of consensus (a + b)/(c + d) > ϕ 2 is satisfied.Hence, ϕ 2 is the critical value of the feedback-gain ratio (a + b)/(c + d) , below which the five drones fly apart and above which the five drones fly coordinately.

General Wuxing network and general golden ratio
The ancient Wuxing network only had five agents.This limitation made it difficult to be applied to modern networks.With the clue given by the golden ratio, we can extend Wuxing network to a network with N elements (N agents) without changing its operation protocol.As shown in Fig. 5, the N agents to be considered are arranged on a circle at equal intervals to form a regular N-sided polygon.The relationship between two agents is defined to be adjacent, if their connection line is a side of the polygon, and is defined to be spaced apart, if their connection line is a diagonal of the polygon.In the network with N = 3 , the three agents are all adjacent to each other, and there is no antagonistic relationship.Therefore, for the N-element network to have both cooperative and antagonistic relationships, the minimum value of N is four, as shown in Fig. 5.
In the N-element Wuxing network, the only agents adjacent to a certain agent P 1 are its left and right agents, which have cooperative interactions with agent P 1 .The remaining N − 3 agents are all separated from agent P 1 , and have antagonistic interactions with agent P 1 .When N increases, the number of cooperative interactions with agent P 1 remains unchanged at 2, but the number of antagonistic interactions is getting larger.Therefore, in order to maintain the balance of the network, the cooperative intensity a + b must be more and more greater than the antagonistic intensity c + d , as the number of agent increases.The special structure of Wuxing network with N = 5 gives us a clue to determine the balance condition of the N-element network by using a simple geometric rule.To simplify the analysis, we assume that the action and reaction between two agents are equal in magnitude, The clue comes from the geometric meaning of the golden ratio ϕ = l/s , where l is the diagonal length and s is the side length of a regular pentagon.The balance condition of the five-element Wuxing network, (a + b)/(c + d) = ϕ 2 = l 2 /s 2 , now can be rewritten as 2as 2 = 2cl 2 .We recall that in the five-element Wuxing network, the diagonal l is weighted by c to denote the antagonistic intensity and the side length s is weighted by a to denote the cooperative intensity.Therefore, the condition 2as 2 = 2cl 2 can be interpreted as the balance between the total cooperative intensity and the total antagonistic intensity.For the N-element Wuxing network, there are still two sides with length s connecting to a certain element P 1 , but there are N − 3 diagonals, with length l 1 , l 2 , • • • , l N−3 , connecting to P 1 , as shown in Fig. 5. Therefore, the extension of the balance condition 2as 2 = 2cl 2 to the N-element Wuxing network becomes ) , which can be restated as the following general rule: This equality can be shown to be equivalent to the stability condition: Re( domi (A N )) = 0 , where A N is the system matrix of the N-element Wuxing network.The number ϕ N in Eq. ( 2) is the general golden ratio defined for the N-element Wuxing network, which has an analytical expression ϕ 2 N = (N/4)csc 2 (π/N) − 1 .When N = 5 , ϕ N becomes the golden ration ϕ and Eq. ( 2) reduces to Eq. (1).If ϕ is replaced by ϕ N , the results in Figs. 2 to 4 can all be applied to the N-element Wuxing network.
(2) , where ϕ N is the general golden ratio defined for the N-element Wuxing network.When N = 5 , the general rule reduces to a/c = ϕ 2 , as already shown in Fig. 2.

Discussion
Wuxing network embodies the golden mean of Chinese culture through the balance between cooperative and competitive interactions.The golden mean, which appeared both in the Confucian philosophy and Aristotelian philosophy, is the desirable middle between two extremes, one of excess and the other of deficiency.When the antagonistic interaction is greater than the cooperative interaction, Wuxing network diverges into disorder.Conversely, when the cooperative interaction is greater than the antagonistic interaction, Wuxing network converges into consensus.The golden mean of Wuxing network is to maintain the balance of the two interactions, so that the network achieves a balanced state that is neither divergent nor convergent.In this article, we used the language of multi-agent network theory to express how Wuxing network presents the golden mean between the two extremes.We found that the condition required by Wuxing network to achieve the philosophical golden mean is given by the mathematical golden mean, i.e. the golden ratio ϕ = (1 + √ 5)/2 , which is recognized as the most astonishing number in the world 4 .The time when the golden ratio appeared in ancient Greek is roughly the time when Wuxing network appeared in ancient Chinese.Both have been widely used in many different fields for more than two thousand years.With the bridge established in this paper, the irrelevant developments of the golden ratio and Wuxing network in different fields will hopefully be integrated.
Since Wuxing philosophy is the foundation of traditional Chinese medicine 33 , the main application of the mathematical model established in this article for the Wuxing network is in traditional Chinese medicine to make it expressible in the language of modern science.As for the engineering field, Wuxing network is helpful for analyzing the balance and stability of the engineering networks when there are both cooperative and antagonistic relationships in the network structure.
From the perspective of modern multi-agent network systems, the ancient Wuxing network naturally has many limitations.This is because the time and space background when it was proposed is completely different from now.Three potential limitations within the Wuxing network are as follows: • The special network structure of Wuxing network: Wuxing network requires that adjacent agents must have a cooperative relationship, while spaced-apart agents must have an antagonistic relationship.This special structure of Wuxing network is derived from the unique traditional Chinese culture, and its characteristics are not shared by ordinary networks.• Wuxing network is a simplified form of five-agent network: A general five-agent network has twenty weights, but Wuxing network has only four weights a , b , c,d , corresponding to generating action, generating reac- tion, overcoming action, and overcoming reaction, respectively.Only in this simplified form can we see the relationship between the golden ratio and the Wuxing network.However, this relationship does not exist in the general five-agent network.• Wuxing network only allows five agents: The number of agents in Wuxing network is five, which is a count- ing unit originating from ancient China.This unique number of agents now becomes a limitation on the application of Wuxing network.The final part of this article has extended the five-agent Wuxing network to the N-agent Wuxing network; however, the latter is still not a general N-agent network, because it possesses the inherent property of Wuxing network that adjacent agents cooperate mutually, while spaced-apart agents compete mutually.
In the possible follow-up research on Wuxing network, how to maintain its unique cultural connotation while taking into account its application in modern science has become the first topic we must face.

Modeling Wuxing network as a weighted graph
The operation of Wuxing pictograph can be summarized into the following three principles: (a) Two Agents' relative position determines the attribute of their relationship.Whether the relationship is cooperative or antagonistic is not determined by the physical property of the agents, but by their relative positions in the network, as regulated by Wuxing operation protocol: adjacent agents generate each other, while spaced-apart agents overcome each other.(b) Action is always accompanied by reaction.Generating action and overcoming action cannot be carried out freely, but must pay the price, which is their accompanying reactions.Generating action and its accompanying reaction constitute the cooperative interaction, while overcoming action and its reaction constitute the antagonistic interaction, as shown in Fig. 6b.(c) Two agents' relative magnitude determines the direction and intensity of their interactions.The directions of the generating action and the overcoming action cannot be prescribed in advance, but are spontaneously determined by the relative magnitude of the agents.
The first operation principle allows us to replace the five natural substances with five abstract agents, represented by five symbols A, B, C, D, E, as long as their interactions follow the Wuxing operation protocol.The second operation principle implies that the interactions between the agents are two-way effects, containing the forward actions and the accompanying reactions.The third operation principle tells us how to determine the direction and intensity of the interaction in an algebraic way.Assuming that the quantitative indices of five abstract agents are represented, respectively, by x A , x B ,x C , x D , and x E , then the sign of x i − x j automatically determines whether the direction of the action is i → j or j → i .Meanwhile, the magnitude of x j − x i weighted Vol:.( 1234567890 www.nature.com/scientificreports/by W ij determines the intensity of the interaction, where W ij > 0 , if the interaction is cooperative, and W ij < 0 , if the interaction is antagonistic.According to the above three operation principles of Wuxing network, we can define Wuxing graph as following.Wuxing graph is a weighted graph G = (V , E) having five vertices V = {x A , x B , x C , x D , x E } arranged in a pentagon with 20 edges, i.e., |E| = 20 .The edge E j→i is weighted by W ij , which is positive if E j→i is a side of the pentagon, and is negative if E j→i is a diagonal of the pentagon, as shown in Fig. 7a.
For each vertex of Wuxing graph, there are 8 edges connected to it, of which four edges are connected outward and four edges are connected inward.In other words, the degree of each vertex of Wuxing graph is 8, with indegree and out-degree both equal to 4. At each moment, the quantitative index x i for each agent is simultaneously Figure 6.The Wuxing graph and the interactions between agent A and the other four agents.(a) Wuxing network can be represented as a weighted graph with 5 vertices and 20 edges, where the edge pointing from agent j to agent i is weighted by W ij .The blue lines denote the generating interaction between adjacent agents with weight W ij > 0 , while the red lines denote the overcoming interaction between spaced-apart agents with weight W ij < 0 . (b) The four edges connected inward to agent A represent, respectively, generating action (GA), generating reaction (GR), overcoming action (OA), and overcoming reaction (OR), which are applied to agent A by the other four agents.The four edges connected outward from agent A represent the four effects imposed by Agent A on the other four agents.www.nature.com/scientificreports/influenced by the indices of the other four agents, so the indices of the five agents actually change from time to time, i.e. x i is a function of time, denoted by x i (t).Like agent A in Fig. 6b, each agent of Wuxing network is subject to four effects: generating action (GA), generating reaction (GR), overcoming action (OA), and overcoming reaction (OR), coming from the other four agents, respectively; meanwhile, each agent in turn applies actions or reactions to the other four agents, as summarized in Supplementary Table S1.Adding the four effects in each row of the table, we obtain the time change rate of each agent as follows: Since the type of interactions in Wuxing network depends on the relative positions of the agents, it has nothing to do with their absolute positions, and no agent is in a particularly dominant position.Wuxing graph shown in Fig. 6a reveals the fact that rotating the graph clockwise or counterclockwise does not change the operation of Wuxing network.In other words, the interaction of Wuxing graph is of rotation invariance.With this kind of rotation invariance, there are only four differences between the 20 weights in Eq. ( 3): In Wuxing network, all the GA weights are equal to a and all the GR weights are all equal to b , and they are collectively called cooperative weights, as shown by the blue lines in Fig. 6a.On the other hand, all the OA weights are equal to −c and all the OR weights are all equal to −d , and they are collectively called antagonistic weights, as shown by the red lines in Fig. 6a.In this way the impact of the 20 weights in Eq. ( 3) can be simplified into an analysis of the four representative weights, a , b , c , and d , denoting the intensities of GA, GR, OA, and OR, respectively.With the four representative weights, Eq. ( 3) is reduced to the following form which can be recast into a matrix form as where σ = −(a + b − c − d) is the negative sum of the four weights.It can be seen that the system matrix A 5 is just the negative Laplacian matrix L(G) of Wuxing graph.Solving the five simultaneous differential equations in Eq. ( 5) provides us with the time evolution of the quantitative index x i (t) of the five agents.

The role of golden ratio in Wuxing network
There are three states existing in Wuxing network, i.e. the state of consensus, the state of balance, and the state of instability.Of significance is that which of the states will happen depends on the golden ratio ϕ = (1 + √ 5)/2 .Different weights in Eqs.(4a-4e) lead to different system matrices A 5 in Eq. ( 5), and result in different network's dynamic behaviors.In order to know the dynamic behaviors of the weighted Wuxing network under different settings of weights, eigenvalues of the system matrix A 5 must be evaluated first.The eigenvalues of A 5 are defined as the roots of the characteristic polynomial of A 5 : The special structure of the matrix A 5 manifests that it has a zero eigenvalue 1 = 0 and two pairs of complex conjugate eigenvalues, which can be expressed as explicit functions of the four weights a , b , c , and d as www.nature.com/scientificreports/where i = √ −1 is the imaginary number, and the two constants α and β are defined as Equations (7a) and (7b) gives a one-to-one relationship between the four non-zero eigenvalues and the four weights.It can be seen that the four weights determine the eigenvalues of the system matrix A 5 in a group of a and b and a group of c and d .More precisely, a + = a + b and c + = c + d constitute the real parts of the eigenvalues and determine the converging speed of the network, while a − = a − b and c − = c − d constitute the imaginary parts of the eigenvalues and determine the oscillation frequency of the network.We recall that the weights a and b correspond to the cooperative interaction between adjacent agents, while c and d correspond to the antagonistic interaction between spaced-apart agents.Therefore, the eigenvalues of the system matrix A 5 is determined by two types of relationships: the relationship between adjacent agents and the relationship between spaced-apart agents.Thus the discovered eigen-structure of the system matrix A 5 is consistent with the ancient Wuxing phi- losophy, which divides the relationship between the five elements into adjacent and spaced-apart dichotomy.
From the linear system theory, the stability of the weighted Wuxing network requires that the real part of the non-zero eigenvalues of A 5 must be negative.This requirement gives a lower bound on the weight ratio (a + b)/(c + d) in terms of the golden ratio.From Eqs. (7a) and (7b), we find that the real part of 2,3 is greater than the real part of 4,5 by noting where β − α = √ 5 and the four parameters a , b , c , and d are all positive.Therefore, the requirement that the real parts of the non-zero eigenvalues must be negative is equivalent to Re 2,3 < 0 , i.e.
where β/α = (3 + √ 5)/2 is just equal to the squared golden ratio ϕ 2 , which gives the lower bound on the ration a + /c + to guarantee the stability of the weighted Wuxing network.
It is worth noting that the golden ratio is exactly the ratio between the diagonal length and the side length of a regular pentagon.This relationship provides a valuable clue that allows us to extend the five-element Wuxing network to a generalized Wuxing network with N-element.
The solutions x i (t) , i = A, B, • • • , E , to Eq. ( 5) can be expressed in terms of 2,3 = σ 2,3 ± ω 2,3 i and 4,5 = σ 4,5 ± ω 4,5 i as where the constant C i originates from the stationary mode e 1 t with 1 = 0 , and A i , B i , θ i , φ i are constants deter- mined from the initial conditions of x i (0) .As t → ∞ , the agent's quantitative index x i (t) in Eq. ( 11) approaches three different states, depending on the relative magnitude of a + /c + to ϕ 2 .
(b) The balanced state: The critical condition a + /c + = ϕ 2 is the boundary between the state of consensus and the state of instability.We note that a + /c + = (a + b)/(c + d) represents the ratio between the sum of cooperative weights and the sum of antagonistic weights.In case of a + /c + > ϕ 2 , the cooperative interaction in Wuxing network is larger than the antagonistic interaction, causing the network to converge to the state of consensus.In case of a + /c + < ϕ 2 , the antagonistic interaction is larger and causes the network to diverge.When the equality a + /c + = ϕ 2 is established, the cooperative interaction and the antagonistic interaction are balanced.Under this condition, Wuxing network neither converges nor diverges, but exhibits a behavior with harmonic oscillation.Substituting a + /c + = ϕ 2 into Eqs.(7a) and (7b), we obtain σ 2,3 = 0 and σ 4,5 < 0 , which is then used in Eq. (11) to yield This is just a harmonic wave with mean C i , amplitude A i , frequency ω 2,3 , and phase θ i .(c) The consensus state: a + /c + > ϕ 2 In case of a + /c + > ϕ 2 , we have σ 4,5 < σ 2,3 < 0 , which implies e σ 2,3 t → 0 and e σ 4,5 t → 0 , as t → ∞ .Hence, from Eq. (11) we have where C i is the steady-state value of x i (t).
From the above analysis, we find that the balance of the two opposite interactions in Wuxing network does not occur at a + /c + = 1 , but at a + /c + = ϕ 2 .Why must the ratio of a + to c + be exactly equal to ϕ 2 in order to maintain the balance of Wuxing network?The answer is that the direction of the cooperative interaction weighted (7b) (11) x i (t) = C i + A i e σ 2,3 t sin(ω 2,3 t + θ i ) + B i e σ 4,5 t sin ω 4,5 t + φ i , (12)   www.nature.com/scientificreports/by a + is along the side of a regular pentagon, while the direction of the antagonistic interaction weighted by c + is along its diagonal.The reason for a + /c + = ϕ 2 becomes obvious, if we notice that the golden ratio ϕ is just the ratio of the diagonal to the side of a regular pentagon.

Detecting golden ratio in Wuxing electronic circuits
A straightforward realization of Wuxing network is given by electronic circuits, where the quantitative indices x i (t) correspond to the voltages of five nodes, the cooperative weights a and b between adjacent agents cor- responds to the positive resistances R a and R b , and the antagonistic weights −c and −d between spaced-apart agents corresponds to the negative resistances −R c and −R d , as shown in Fig. 3.The voltages of the five nodes are represented, respectively, by v A , v B , v C , v D , and v E .The capacitances at the five nodes are all set to C , and the charges stored in the capacitors are denoted by Q A , Q B , Q C , Q D , and Q E .According to the law of conservation of charge, the change rate of the charge for each node can be expressed as follows: where R a > 0 is the resistance of a normal resistor and −R c < 0 and −R d < 0 are the resistances of two resonant tunneling diodes operating in the range of negative resistance.By redefining the above parameters as Equations (14a-14e) can be recast into a familiar form: Comparing Eqs.(16a-16e) with Eqs.(4a-4e), we can see that the circuit Eqs.(16a-16e) is just the mathematical model for Wuxing network with a = b .The five eigenvalues of the system matrix associated with Eqs.(16a-16e) can be found from Eqs. (7a) and (7b) with a = b as 1 = 0 and The main application of Wuxing circuit is to work as an oscillating circuit to generate harmonic waves of various frequencies.The condition for the harmonic oscillation of Wuxing circuit is σ 2,3 = 0 , that is Under this condition, we have σ 2,3 = 0 and σ 4,5 < 0 , and Wuxing network enters the balanced state as described by Eq. ( 12) with the oscillation frequency given by (14a) www.nature.com/scientificreports/Therefore, the squared golden ratio ϕ 2 can be detected experimentally by tuning the resistance ratio 2a until Wuxing circuit exhibits a harmonic oscillation, and the tuned point is ϕ 2 .If a harmonic wave of frequency ω * 2,3 is to be generated, we only need to substitute ω * 2,3 into Eq.( 19) and solve together with the harmonic condition (18) to get the required constants c and d , i.e. the required negative resistances of two resonant tunneling diodes.Then the resulting Wuxing circuit oscillates with the prescribed frequency ω * 2,3 .Figure 3 shows that Wuxing circuit generates harmonic waves with assigned frequencies ω = 1 , 5 and 10 , by choosing the values of c and d through Eqs. ( 18) and ( 19) with a = 1.

Detecting golden ratio in Wuxing formation flight
In order to produce the hybrid interaction required by Wuxing network, each drone in Fig. 4 is equipped with a sensor, an on-board computer, and an actuator.Referring to the control block diagram of drone A in Fig. 7, the sensor, which is an inertial navigation system integrated with a GPS receiver, is used to measure the current position of the drone A; the onboard computer calculates the control signal u based on the position errors between drone A and the other four drones; the actuator (motor) receives the control signal u to change the rotating speed of the blades to adjust the attitude and flight speed of the drone in order to achieve the coordinated flight with other drones.The agent played by drone A with sensing, computing and driving functions is an automatic control unit.The flight network composed of five drones implements the hybrid interactions of Wuxing network through five automatic control units.
From the point of view of feedback control theory, the cooperative interaction in Wuxing network is equivalent to negative feedback (blue loops in Fig. 7), and the antagonistic interaction is equivalent to positive feedback (red loops).Referring to Fig. 7, after the position x A of drone A is measured by the sensing element, it is compared with x E and x B in a negative feedback manner (i.e. with −x A ) to generate the control signals a(x E − x A ) and b(x B − x A ) .At the same time, the position x A of drone A is also compared with x D and x C in a positive feedback manner (i.e. with +x A ) to generate the control signals c(x A − x D ) and d(x A − x C ) .In addition to the above four feedback control signals, drone A receives an input command r com from the ground command center, which is the path command it wants to track.Combining the above five items, we get the control signal u A of drone A as: The last term of u A is called the tracking error, which is the error between the position of drone A and the path command r com to be tracked.The control signals for the other drones can be derived by the same way and the combination of the five control signals gives where e ij = x i − x j is the coordination error between drone i and drone j , e com = r com − x A is the command tracking error, and u − and u + correspond to negative and positive feedback signals.Except for the command signal u com , Eq. ( 21) is identical to Eq. (4a-4e) with e ij = x i − x j .The positive feedback control u + tends to enlarge the coordination error e ij and makes the five drones depart from each other.The appearance of the posi- tive feedback control u + indicates that Wuxing formation flight combines friendly and enemy drones, which is different from the current formation flight for which all the drones are friendly 30,31 .Therefore, formation flight based on Wuxing network is far more difficult to realize than the existing formation flight.Nevertheless, the convergence of Wuxing network under the condition (a + b)/(c + d) > ϕ 2 ensures that Wuxing formation flight mission can be achieved.
The analogy between Eqs. ( 21) and (4a-4e) indicates that the formation flight with e ij → 0 , i.e., the state of consensus, is attained by requiring that the ratio of the negative feedback gain a + b to the positive feedback gain c + d must be greater than the squared golden ratio ϕ 2 .Hence, the squared golden ratio ϕ 2 is the critical value of the feedback-gain ratio (a + b)/(c + d) , below which the five drones fly apart, and above which the five drones fly coordinately.By tuning the feedback gain ratio continuously and monitoring the dynamic responses of the drones, we therefore can detect ϕ 2 as the critical value of feedback gain ratio.
Three flight patterns can be identified in Fig. 8 according to the value of (a + b)/(c + d) .Cases (a) and (b), which satisfy the stability condition (a + b)/(c + d) > ϕ 2 , exhibit the formation flight that all the five drones converge to the state of consensus specified by the circular path command r com = (5sin(0.2t),5cos(0.2t)) .The converging speed of case (a) is faster than that of case (b), because a larger feedback-gain ratio (a + b)/(c + d) is used in the flight control for case (a).Case (c) adopts a feedback-gain ratio exactly equal to ϕ 2 and yields a criti- cal flight scenario, in which the trajectory of the drones neither diverges nor converges to the target trajectory, but each exhibits periodic oscillations.Case (d) adopts a feedback-gain ratio smaller than ϕ 2 and produces an unstable flight pattern in which the drones fly separately to disintegrate the formation flight.
In Fig. 8, we observe that the trajectories of different drones may intersect.However, the intersection of trajectories does not mean that the drones collided together.This is because the two drones arrived at the trajectory intersection point at different times.When one drone reaches the trajectory intersection point, the other drone may not have arrived yet, or may have already left, so the two drones will not collide.The relative magnitude of the feedback-gain ratio (a + b)/(c + d) to ϕ 2 determines which of the three flight patterns to occur.This rela- tion allows us to determine ϕ 2 by tuning the feedback-gain ratio (a + b)/(c + d) until the critical flight scenario appears, and then the tuned value is just the squared golden ration ϕ 2 .

Figure 1 .
Figure 1.Both Wuxing network and the golden ratio are related to the regular pentagon.The golden ratio ϕ refers to the ratio of the diagonal length to the side length in a regular pentagon.In Wuxing network, agents connected by the sides of the pentagon cooperate with each other (mutual generating with weights a and b ), while agents connected diagonally oppose each other (mutual overcoming with weights −c and −d ).It is discovered that the generating and overcoming interactions are balanced if the ratio (a + b)/(c + d) is equal to the squared golden ratio ϕ 2 .
Figure 4 realizes the operation of Wuxing network by the formation flight of five drones.The flight network consisting five drones (1) a + b c + d = ϕ 2 .

Figure 2 .
Figure2.Three dynamic states of Wuxing network corresponding to three regions of the intensity ratio.When the intensity ratio (a + b)/(c + d) is less than ϕ 2 , Wuxing network exhibits unstable dynamic behavior.When the intensity ratio is equal to ϕ 2 , Wuxing network reaches a balanced state, where x i (t) presents a harmonic oscillation.When the intensity ratio is greater than ϕ 2 , Wuxing network enters a consensus state, where x i (t) converges to the same value.

Figure 3 .
Figure 3. Detecting golden ratio in Wuxing electronic circuit.The negative resistances −R c < 0 and −R d < 0 of two resonant tunneling diodes are used to implement the antagonistic interaction in Wuxing network, while the normal resistor R a > 0 implements the cooperative interaction.The golden ratio can be detected experimentally by tuning the value of (a + b)/(c + d) = 2R −1 a /(R −1 c + R −1 d ) until the node's voltage exhibits harmonic oscillation.The tuned point of 2R −1 a /(R −1 c + R −1 d ) then gives the squared golden ratio ϕ 2 .

Figure 4 .
Figure 4. Detecting golden ratio in Wuxing-formation flight.The five drones play the role of autonomous agents in Wuxing network in such a way that adjacent drones form a negative feedback loop (blue lines), while space-apart drones form a positive feedback loop (red lines).The coordinated flight of the five drones requires that the ratio of the negative feedback gain to the positive feedback gain must be greater than the squared golden ratio.

Figure 5 .
Figure 5.General Wuxing network and general golden ratio.The agents of the N-element Wuxing network locate on the vertices of a regular N-sided polygon.The cooperative agents are connected by the sides of the polygon with weight a , while the antagonistic agents are connected by the diagonals of the polygon with weight −c .The general balance rule is given by a/c = ϕ 2N , where ϕ N is the general golden ratio defined for the N-element Wuxing network.When N = 5 , the general rule reduces to a/c = ϕ 2 , as already shown in Fig.2.

Figure 7 .
Figure 7.The control block diagram of the formation flight based on Wuxing network.To implement the operation protocol of Wuxing network, each drone is equipped with a sensor, an on-board computer, and an actuator.The blue lines represent the negative feedback loop produced by the cooperative interaction with feedback gain a and b , and the red lines represent the positive feedback loop produced by the antagonistic interaction with feedback gain c and d .Negative feedback makes the five drones fly in formation, while positive feedback tends to disintegrate the formation flight.Whether the drones fly coordinately or fly apart depends on the relative magnitude of (a + b)/(c + d) to the squared golden ratio ϕ 2 . https://doi.org/10.1038/s41598-023-46071-6

( 20 )
ẋA = u A = a(x E − x A ) + b(x B − x A ) + c(x A − x D ) + d(x A − x C ) + w(r com − x A ).